<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>箭头函数</title>
</head>
<body>

</body>
<script>
    function add(a,b){
        return a+b
    }

    console.log(add(5,2))

    /*
        (param1, paramN) => {
          statements
        }
     */
    var add2 = (a,b) =>  a+b
    console.log(add2(3,5))


    /*
        param => {
          statements
        }

     */
    var c = a => a+1
    console.log(c(5))

    /*
        () => {
          statements
        }
     */
    var d = ()=>  9
    console.log(d())

    /*
        (param1, paramN) => expression
     */
    var e = (a,b) => a*b
    console.log(e(3,6))

</script>
</html>